<template>
  <div class="bc">
    <el-form ref="elForm" :model="formData" :rules="rules" size="medium"
             label-width="150px" class="components-form">
      <el-form-item :label="factorItemTitle" prop="field103" class="item">
        <el-select v-model="formData.field112" placeholder="大于" clearable
                   class="components-select">
          <el-option v-for="(item, index) in field112Options" :key="index"
                     :label="item.label"
                     :value="item.value" :disabled="item.disabled"></el-option>
        </el-select>
        <el-input v-model="formData.field103" placeholder="0.00" clearable
                  :style="{width: '50%', marginLeft: 20}">
        </el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import {
    getfield112Options
  } from '@/api/system/category'
export default {

  components: {},
  props: ['factorItemTitle'],
  data() {
    return {
      formData: {
        field112: undefined
      },
      rules: {
        field112: [{
          required: true,
          message: '请选择下拉选择',
          trigger: 'change'
        }]
      },
      field112Options: []
    }
  },
  computed: {},
  watch: {},
  created() {
    this.getfield112Option()
  },
  mounted() {
  },
  methods: {
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (!valid) return
        // TODO 提交表单
      })
    },
    /** 查询因子类别列表 */
    getfield112Option() {
      this.loading = true
      getfield112Options().then(response => {
        // alert(response.data)
        this.field112Options = response.data
        this.total = response.total
        this.loading = false
        // this.conditionItemList = response.rows;
      })
    },
    resetForm() {
      this.$refs['elForm'].resetFields()
    }
  }
}

</script>
<style>

.bc {
  background-color: pink;
}

.components-form {
  line-height: 1.5;
}

.item {
  line-height: 60px
}

.item .el-form-item__label {
  text-align: left;
  font-size: 11px;
  background-color: #ed5565;
  line-height: 1.4em;
  margin: auto 10px;
  padding-top: 3px;
  /*position: relative;*/
}

.components-select {
  width: 80px;
}

</style>



<template>
  <div>
    <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
      <el-form-item label="单行文本" prop="field101">
        <el-input v-model="formData.field101" placeholder="请输入单行文本" clearable :style="{width: '100%'}">
        </el-input>
      </el-form-item>
      <el-form-item size="large">
        <el-button type="primary" @click="submitForm">提交</el-button>
        <el-button @click="resetForm">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  components: {},
  props: [],
  data() {
    return {
      formData: {
        field101: undefined,
      },
      rules: {
        field101: [{
          required: true,
          message: '请输入单行文本',
          trigger: 'blur'
        }],
      },
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (!valid) return
        // TODO 提交表单
      })
    },
    resetForm() {
      this.$refs['elForm'].resetFields()
    },
  }
}

</script>
<style>
</style>
